package org.geek4j.thirty.percent.controller;

import java.util.List;

import org.geek4j.thirty.percent.persistence.domain.Category;
import org.geek4j.thirty.percent.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author Geek4J
 * @since 2016年4月9日 上午11:22:19
 * @description CaptchaController
 */
@Controller
@RequestMapping("category")
public class CategoryController {

	@Autowired
	private CategoryService categoryService;

	@RequestMapping("findAll")
	public ResponseEntity<List<Category>> findAll() {
		return ResponseEntity.ok(categoryService.findAll());
	}
}
